<template>
  <div class="helpPage">
    <Vheader :header="header"></Vheader>
    <div class="mainContent">
      <div class="title">
        <span>微小活动使用平台导航</span>
        <input name="search"/>
      </div>
      <div class="content">
        <ul class="navigator">
          <template v-for="item in helpList">
            <li class="list" :key="item.id" @click="listClick">
              <span>{{item.name}}</span>
              <img src="static/imgs/help/Triangular-top.png"/>
              <ul v-if="item.children">
                <template v-for="list in item.children">
                  <li class="listChildren" :key="list.id">{{list.name}}</li>
                </template>
              </ul>
            </li>
          </template>
        </ul>
        <div class="description"></div>
      </div>
    </div>
    <Vfooter></Vfooter>
  </div>
</template>

<script>
import Vheader from './common/Vheader'
import Vfooter from './common/Vfooter'
export default {
  name: 'homePage',
  data () {
    return {
      header: {
        templateAction: this.templateAction,
        template: '返回首页'
      },
      helpList: [
        {
          description: '',
          id: 1,
          name: '登录/注册',
          children: [
            {description: '', id: 11, name: '登录'},
            {description: '', id: 12, name: '注册'},
            {description: '', id: 13, name: '忘记密码'}
          ]},
        {
          description: '',
          id: 2,
          name: '创建活动',
          children: [
            {description: '', id: 21, name: '登录'},
            {description: '', id: 22, name: '注册'},
            {description: '', id: 23, name: '忘记密码'}
          ]},
        {
          description: '',
          id: 3,
          name: '启动活动',
          children: [
            {description: '', id: 31, name: '如何启动活动'},
            {description: '', id: 32, name: '启动活动失败'},
            {description: '', id: 33, name: '下载启动二维码失败'}
          ]}
      ]
    }
  },
  components: {
    Vheader,
    Vfooter
  },
  created () {},
  methods: {
    // 跳转到首页
    templateAction (id) {
      this.$router.push({name: 'homePage'})
    },
    listClick () {

    }
  }
}
</script>
<style scoped>
  .helpPage{
    background-color: #e9e9e7;
  }
  .mainContent{
    margin: 26px 151px 0;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .mainContent .title{
    height: 45px;
    font-size: 24px;
    display: flex;
    justify-content: space-between;
    padding-left: 20px;
  }
  .content{
    display: flex;
    justify-content: flex-start;
  }
  .content .navigator{
    width: 339px;
    text-align: left;
    font-size: 18px;
  }
  .navigator .list{
    line-height: 50px;
    padding-left: 20px;
    border-top: 1px solid #e9e9e7;
    border-right: 1px solid #e9e9e7;
  }
  .listChildren{
    line-height: 50px;
    margin-left: -20px;
    padding-left: 20px;
    border-top: 1px solid #e9e9e7;
  }
  .navigator .listChildren:hover{
    background-color:#e9e9e7 ;
  }

</style>
